<%#
  # WebROaR - Ruby Application Server - http://webroar.in/
  # Copyright (C) 2009  Goonj LLC
  #
  # This file is part of WebROaR.
  #
  # WebROaR is free software: you can redistribute it and/or modify
  # it under the terms of the GNU General Public License as published by
  # the Free Software Foundation, either version 3 of the License, or
  # (at your option) any later version.
  #
  # WebROaR is distributed in the hope that it will be useful,
  # but WITHOUT ANY WARRANTY; without even the implied warranty of
  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  # GNU General Public License for more details.
  #
  # You should have received a copy of the GNU General Public License
  # along with WebROaR.  If not, see <http://www.gnu.org/licenses/>.
  #%>
  <style>
    form { margin:0px;display:inline;}
  </style>
  <br/>
  <div id = "page_name"><%=image_tag("title_configuration_15_06_2011.gif", :border => '0')%></div>
  <%port, min_worker, max_worker, log_level, ssl_support, ssl_port, certificate, key, access_log = ServerSpecification.get_fields %>	
  <br/>  
    <table width = 95%  align='center'>
      <tr>
        <th  colspan = 3>Server Specifications</th>
      </tr>
      <tr>
        <td width = 40% > Port</td>	
        <td width = 40% ><div id = 'port_div'><%= port %></div></td>
        <td width = 20% ><%=link_to_remote 'Edit', :update => 'port_div', :url => {:controller => 'server_specification', :action => 'add_text_box', :div_id => 'port_div'}%></td>
      </tr>
      <tr>
        <td >Minimum number of workers&nbsp;&nbsp;&nbsp;
            <%=link_to_function "Help", :onclick => "addHelp('minworker',event)"%>
        </td>
        <td ><div id = 'min_pro_div'><%= min_worker %></div></td>
        <td ><%=link_to_remote 'Edit', :update => 'min_pro_div', :url => {:controller => 'server_specification', :action => 'add_text_box', :div_id => 'min_pro_div'}%></td>
      </tr>
      <tr>
        <td >Maximum number of workers&nbsp;&nbsp;&nbsp;
            <%=link_to_function "Help", :onclick => "addHelp('maxworker',event)"%>
        </td>
        <td ><div id = 'max_pro_div'><%= max_worker %></div></td>
        <td ><%=link_to_remote 'Edit', :update => 'max_pro_div', :url => {:controller => 'server_specification', :action => 'add_text_box', :div_id => 'max_pro_div'}%></td>
      </tr>
      <tr>
        <td >Log Level&nbsp;&nbsp;&nbsp;
            <%=link_to_function "Help", :onclick => "addHelp('log_level',event)"%>
        </td>
        <td ><div id = 'log_div'><%= log_level %></div></td>
        <td ><%=link_to_remote 'Edit', :update => 'log_div', :url => {:controller => 'server_specification', :action => 'add_text_box', :div_id => 'log_div'}%></td>
      </tr>
    </table>
    <br/><br/>
    <%=raw(ssl_block(@info, ssl_port, certificate, key))%>
    <div id = 'mail_div'>
      <%if flash[:sendmail_errors]%>
        <%=render :partial => 'mail_specification/sendmail_form'%>
      <%elsif flash[:smtp_errors]%>
        <%=render :partial => 'mail_specification/smtp_form'%>
      <%else%>
        <%=render :partial => 'mail_specification/current_spec' %>    
      <%end%>  
    </div>   
  	<div id = 'headers_div'>
  		<%= render :partial => 'headers/headers_table' %>
  	</div>
  	<br/>
  	<br/>		
    <div id = 'application_list_table'>
      <%=render :partial => 'application_table'%>
    </div>